import 'package:flutter/material.dart';
import '../models/anniversary.dart';

class AnniversaryCountdownCard extends StatelessWidget {
  final Anniversary data;
  const AnniversaryCountdownCard({super.key, required this.data});

  @override
  Widget build(BuildContext context) {
    return Card(
      color: Color(data.colorValue),
      shape: RoundedRectangleBorder(borderRadius: BorderRadius.circular(20)),
      elevation: 4,
      child: Padding(
        padding: const EdgeInsets.all(24),
        child: Row(
          children: [
            Icon(IconData(data.iconCode, fontFamily: 'MaterialIcons'), color: Colors.white, size: 40),
            const SizedBox(width: 20),
            Expanded(
              child: Column(
                crossAxisAlignment: CrossAxisAlignment.start,
                children: [
                  Text(
                    data.name,
                    style: const TextStyle(fontSize: 20, color: Colors.white, fontWeight: FontWeight.bold),
                  ),
                  const SizedBox(height: 8),
                  Text(
                    '距离纪念日还有',
                    style: const TextStyle(fontSize: 14, color: Colors.white70),
                  ),
                  Text(
                    '${data.daysLeft} 天',
                    style: const TextStyle(fontSize: 32, color: Colors.white, fontWeight: FontWeight.bold),
                  ),
                ],
              ),
            ),
          ],
        ),
      ),
    );
  }
} 